<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head th:include="~{common/header :: commonHead}">
    <title>审核小票自助积分</title>
</head>
<style>
    #orgId{
        z-index: 999!important;
    }
    .id_option{
        z-index: 999!important;
    }
    .form-control{
        height: auto !important;
    }
</style>
<body class="gray-bg">
<div class="wrapper wrapper-content animated fadeInRight">
    <div class="row">
        <div class="col-sm-12">
            <div class="ibox float-e-margins">
                <div class="ibox-title">

                    <h5 th:text="${'审核小票自助积分' }"></h5>

                    <div class="ibox-tools">
                    </div>
                </div>

                <div class="ibox-content">
                    <form class="row form-body form-horizontal m-t" method="post" action="/self_help_integral/edit">
                        <div class="col-md-12 droppable sortable ui-droppable ui-sortable">

                            <div class="form-group draggable ui-draggable dropped" style="position: static;">
                                <label class="col-sm-3 control-label">小票图片：</label>
                                <div class="col-sm-2">
                                    <img th:src="${editable?.imgUrl}" class="form-control" required="required">
                                </div>
                            </div>
                            <div class="form-group draggable ui-draggable dropped" style="display: none">
                                <label class="col-sm-3 control-label">用户手机号：</label>
                                <div class="col-sm-6">
                                    <input type="text" name="selfHelpIntegralId" th:value="${editable?.selfHelpIntegralId}">
                                </div>
                            </div>
                            <div class="form-group draggable ui-draggable dropped" style="position: static;">
                                <label class="col-sm-3 control-label">用户手机号：</label>
                                <div class="col-sm-6">
                                    <input type="text" name="phone" th:value="${editable?.phone}" class="form-control" required="required" placeholder="请输入用户手机号" readonly>
                                </div>
                            </div>
                            <div class="form-group draggable ui-draggable dropped" style="position: static;">
                                <label class="col-sm-3 control-label">小票号：</label>
                                <div class="col-sm-6">
                                    <input type="text" name="ticketNum" th:value="${editable?.ticketNum}" class="form-control" required="required" placeholder="请输入小票号" readonly>
                                </div>
                            </div>
                            <div class="form-group draggable ui-draggable dropped" style="position: static;">
                                <label class="col-sm-3 control-label">金额：</label>
                                <div class="col-sm-6">
                                    <input type="text" name="money" th:value="${editable?.money}" class="form-control" required="required"  placeholder="请输入金额" readonly>
                                </div>
                            </div>
                            <div class="form-group draggable ui-draggable dropped"  style="position: static;">
                                <label class="col-sm-3 control-label">消费时间：</label>
                                <div class="col-sm-6">
                                    <div class="input-group date">
                                        <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
                                        <input style="z-index:0" readonly type="text" placeholder="选择消费时间" class="form-control" id="start_date" name="consumeDay" th:value="${editable?.consumeDay}" required="required" autocomplete="off" disabled="true" th:readonly="true">
                                    </div>
                                </div>
                            </div>
                            <div class="form-group draggable ui-draggable dropped" style="position: static;">
                                <label class="col-sm-3 control-label">选择商户：</label>
                                <div class="col-sm-6">
                                    <input type="text"  th:value="${editable?.storeName}" class="form-control" required="required"  readonly>
                                </div>
                            </div>
                            <div class="form-group draggable ui-draggable dropped" style="position: static;">
                                <label class="col-sm-3 control-label">审核状态：</label>
                                <div class="col-sm-6">
                                    <select id="orgId" name="applicationStatus" class="form-control"  >
                                        <option value="reviewing">审核中</option>
                                        <option value="successpass">通过</option>
                                        <option value="failpass">未通过</option>
                                    </select>
                                </div>
                            </div>

                            <div class="form-group draggable ui-draggable dropped" style="position: static;">
                                <label class="col-sm-3 control-label">审核备注：</label>
                                <div class="col-sm-6">
                                    <input type="text" name="remarkApplication" th:value="${editable?.remarkApplication}" class="form-control" required="required"  >
                                </div>
                            </div>

                            <div class="hr-line-dashed"></div>

                            <div class="form-group draggable ui-draggable">
                                <div class="col-sm-12 col-sm-offset-3">
                                    <button class="btn btn-primary" id="submitBtn" disabled>审核提交</button>
                                </div>
                            </div>

                        </div>
                    </form>
                </div>
            </div>
        </div>
    </div>
</div>

<script th:inline="javascript">
    $("#orgId").change(() => {
        let value = $("#orgId").val();
        if (value != 'reviewing') {
            $("#submitBtn").removeAttr('disabled');
        } else {
            $("#submitBtn").attr('disabled','true');
        }
    });

</script>
</body>
</html>